package club.caihappy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * Created by 百岁 on 2021/10/3
 **/
@Controller
public class HelloController {
    @RequestMapping("/index")
    public String hello(Model model){
        model.addAttribute("msg","Hello World!!!");
        model.addAttribute("lists", Arrays.asList("蔡明宏","蔡铭浩"));
        return "index";
    }
}
